bitkeeper revision 1.303.2.1 (3f0bd23bjmByDrErI4CVnaylQxBxhA)
authorsos22@labyrinth.cl.cam.ac.uk <sos22@labyrinth.cl.cam.ac.uk>
Wed, 9 Jul 2003 08:28:43 +0000 (08:28 +0000)
committersos22@labyrinth.cl.cam.ac.uk <sos22@labyrinth.cl.cam.ac.uk>
Wed, 9 Jul 2003 08:28:43 +0000 (08:28 +0000)
Whitespace cleanup.

BitKeeper/etc/ignore
tools/internal/xi_phys_grant.c
tools/internal/xi_phys_probe.c
tools/internal/xi_phys_revoke.c

index e8cfff001cf8883c89b5890a687ab0e63f1b50c2..cf41f0cc4eccd77039fa6f60aee480a3d3b8c786 100644 (file)
@@ -433,3 +433,6 @@ xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_physdisk_proc.c.bak
 xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_physdisk_proc.c~
 xen/drivers/block/xen_block.c~
 xen/drivers/block/xen_physdisk.c~
+tools/internal/xi_phys_grant.c~
+tools/internal/xi_phys_probe.c~
+tools/internal/xi_phys_revoke.c~
index 58c00ed882200d759f2db9aa1dbdad95e4d9af52..368414f4f51465a023c9bf82af09f3aa97f2c034 100644 (file)
 
 int main(int argc, char *argv[])
 {
-  xp_disk_t buf;
-  int fd;
-  char *strbuf;
-
-  if (argc != 7) {
-    fprintf(stderr, "Usage: xi_physdev_grant <r/rw> <domain> <device> <start sector> <n_sectors> <partition>\n");
-    return 1;
-  }
-
-  buf.mode = 0;
-  if (argv[1][0] == 'r')
-    buf.mode |= 1;
-  else if (argv[1][0] == 'w')
-    buf.mode |= 2;
-  if (argv[1][1] == 'r')
-    buf.mode |= 1;
-  else if (argv[1][1] == 'w')
-    buf.mode |= 2;
-  
-  buf.device = atol(argv[3]);
-  buf.start_sect = atol(argv[4]);
-  buf.n_sectors = atol(argv[5]);
-  buf.partition = atol(argv[6]);
-
-  asprintf(&strbuf, "/proc/xeno/dom%s/phd", argv[2]);
-  fd = open(strbuf, O_WRONLY);
-  if (fd < 0) {
-    fprintf(stderr, "Can\'t open %s: %s.\n", strbuf, strerror(errno));
-    return 1;
-  }
-  free(strbuf);
-
-  write(fd, &buf, sizeof(buf));
-  close(fd);
-
-  return 0;
+    xp_disk_t buf;
+    int fd;
+    char *strbuf;
+
+    if (argc != 7) {
+       fprintf(stderr,
+               "Usage: xi_physdev_grant <r/rw> <domain> <device> <start sector> <n_sectors> <partition>\n");
+       return 1;
+    }
+
+    buf.mode = 0;
+    if (argv[1][0] == 'r')
+       buf.mode |= 1;
+    else if (argv[1][0] == 'w')
+       buf.mode |= 2;
+    if (argv[1][1] == 'r')
+       buf.mode |= 1;
+    else if (argv[1][1] == 'w')
+       buf.mode |= 2;
+
+    buf.device = atol(argv[3]);
+    buf.start_sect = atol(argv[4]);
+    buf.n_sectors = atol(argv[5]);
+    buf.partition = atol(argv[6]);
+
+    asprintf(&strbuf, "/proc/xeno/dom%s/phd", argv[2]);
+    fd = open(strbuf, O_WRONLY);
+    if (fd < 0) {
+       fprintf(stderr, "Can\'t open %s: %s.\n", strbuf, strerror(errno));
+       return 1;
+    }
+    free(strbuf);
+
+    write(fd, &buf, sizeof(buf));
+    close(fd);
+
+    return 0;
 }
index e38bb1634b8d08faaa5937de8cd443337546855c..a3dfd8952bb7eb6d52c32c49849557efe1789522 100644 (file)
 
 int main(int argc, char *argv[])
 {
-  physdisk_probebuf_t buf;
-  int fd;
-  int x;
-  char *strbuf;
+    physdisk_probebuf_t buf;
+    int fd;
+    int x;
+    char *strbuf;
 
-  if (argc != 2) {
-    fprintf(stderr, "Usage: xi_phys_probe <domain_nr>\n");
-    return 1;
-  }
+    if (argc != 2) {
+       fprintf(stderr, "Usage: xi_phys_probe <domain_nr>\n");
+       return 1;
+    }
 
-  asprintf(&strbuf, "/proc/xeno/dom%s/phd", argv[1]);
-  fd = open(strbuf, O_RDONLY);
-  if (fd < 0) {
-    fprintf(stderr, "Can\'t open %s: %s.\n", strbuf, strerror(errno));
-    return 1;
-  }
-  free(strbuf);
+    asprintf(&strbuf, "/proc/xeno/dom%s/phd", argv[1]);
+    fd = open(strbuf, O_RDONLY);
+    if (fd < 0) {
+       fprintf(stderr, "Can\'t open %s: %s.\n", strbuf, strerror(errno));
+       return 1;
+    }
+    free(strbuf);
 
-  memset(&buf, 0, sizeof(buf));
-  buf.n_aces = PHYSDISK_MAX_ACES_PER_REQUEST;
-  do {
+    memset(&buf, 0, sizeof(buf));
     buf.n_aces = PHYSDISK_MAX_ACES_PER_REQUEST;
-    read(fd, &buf, sizeof(buf));
-    if (!buf.n_aces)
-      break;
+    do {
+       buf.n_aces = PHYSDISK_MAX_ACES_PER_REQUEST;
+       read(fd, &buf, sizeof(buf));
+       if (!buf.n_aces)
+           break;
 
-    for (x = 0; x < buf.n_aces; x++) {
-      char read = ( buf.entries[x].mode & 1 ? 'r' : ' ' );
-      char write = ( buf.entries[x].mode & 2 ? 'w' : ' ' );
-      printf("%x %x %lx %lx %c%c\n", buf.entries[x].device,
-            buf.entries[x].partition,
-            buf.entries[x].start_sect,
-            buf.entries[x].n_sectors,
-            read,
-            write);
-    }
-    buf.start_ind += buf.n_aces;
-  } while (buf.n_aces == PHYSDISK_MAX_ACES_PER_REQUEST);
-  return 0;
+       for (x = 0; x < buf.n_aces; x++) {
+           char read = (buf.entries[x].mode & 1 ? 'r' : ' ');
+           char write = (buf.entries[x].mode & 2 ? 'w' : ' ');
+           printf("%x %x %lx %lx %c%c\n", buf.entries[x].device,
+                  buf.entries[x].partition,
+                  buf.entries[x].start_sect,
+                  buf.entries[x].n_sectors, read, write);
+       }
+       buf.start_ind += buf.n_aces;
+    } while (buf.n_aces == PHYSDISK_MAX_ACES_PER_REQUEST);
+    return 0;
 }
index 2bcfacb591fcb727240c790e49f3b8c2460c1378..c39146e889bc533895cf6ae031f79e8616c49615 100644 (file)
 
 int main(int argc, char *argv[])
 {
-  xp_disk_t buf;
-  int fd;
-  char *strbuf;
+    xp_disk_t buf;
+    int fd;
+    char *strbuf;
 
-  if (argc != 5) {
-    fprintf(stderr, "Usage: xi_physdev_revoke <domain> <device> <start sector> <n_sectors>\n");
-    return 1;
-  }
+    if (argc != 5) {
+       fprintf(stderr,
+               "Usage: xi_physdev_revoke <domain> <device> <start sector> <n_sectors>\n");
+       return 1;
+    }
 
-  buf.device = atol(argv[2]);
-  buf.mode = 0;
-  buf.start_sect = atol(argv[3]);
-  buf.n_sectors = atol(argv[4]);
+    buf.device = atol(argv[2]);
+    buf.mode = 0;
+    buf.start_sect = atol(argv[3]);
+    buf.n_sectors = atol(argv[4]);
 
-  asprintf(&strbuf, "/proc/xeno/dom%s/phd", argv[1]);
-  fd = open(strbuf, O_WRONLY);
-  if (fd < 0) {
-    fprintf(stderr, "Can\'t open %s: %s.\n", strbuf, strerror(errno));
-    return 1;
-  }
-  free(strbuf);
+    asprintf(&strbuf, "/proc/xeno/dom%s/phd", argv[1]);
+    fd = open(strbuf, O_WRONLY);
+    if (fd < 0) {
+       fprintf(stderr, "Can\'t open %s: %s.\n", strbuf, strerror(errno));
+       return 1;
+    }
+    free(strbuf);
 
-  write(fd, &buf, sizeof(buf));
-  close(fd);
+    write(fd, &buf, sizeof(buf));
+    close(fd);
 
-  return 0;
+    return 0;
 }